package com.hongning.railway.ui.main.fragments.college.itemviewModel;

import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hongning.railway.R;
import com.hongning.railway.entity.resbean.Fileterbean;

import java.util.List;

public class CollegeFilterAdapter extends BaseQuickAdapter<Fileterbean, BaseViewHolder> {
    public CollegeFilterAdapter(@Nullable List<Fileterbean> data) {
        super(R.layout.collegefileter_item,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Fileterbean item) {
    helper.setText(R.id.collegefileter_item_title,item.getTitle());
   helper.<RecyclerView>getView(R.id.collegefileter_item_RecyclerView).setLayoutManager(new GridLayoutManager(mContext,4));
        CollegeFilterItemAdapter collegeFilterItemAdapter=new CollegeFilterItemAdapter(item.getChildData());
        collegeFilterItemAdapter.setRadioSelect(false);
   helper.<RecyclerView>getView(R.id.collegefileter_item_RecyclerView).setAdapter(collegeFilterItemAdapter);
    }
}
